package com.gitee.designpattern.singleton.lazysafe;

/**
 * @author ming.yan-1
 * @version V1.0
 * @Title com.gitee.designpattern.singleton.lazysafe
 * @Description 懒汉 线程绝对安全 性能低下
 * @date 2018/8/30  下午5:46
 */
public class Singleton {
    private static Singleton singleton;
    private Singleton(){
    }

    public static synchronized Singleton getInstance(){
        if(singleton == null){
            singleton = new Singleton();
        }
        return singleton;
    }
}
